home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2001 May
/
SGI Freeware 2001 May - Disc 3.iso
/
dist
/
fw_nmh.idb
/
usr
/
freeware
/
bin
/
sendfiles.z
/
sendfiles
Wrap
Text File
|
2001-04-12
|
784b
|
43 lines
#!/bin/sh
#
# $Id: sendfiles,v 1.1.1.1 1999/04/30 18:08:35 doug Exp $
#
# Send multiples files and/or directories as a tar/compressed
# image, in a MIME message.
#
DELAY=0
FROM=
case "$1" in
-*) DELAY="`echo $1 | sed -e 's%-%%'`"
shift
;;
esac
if [ ! -z "$PERSON" ]; then
FROM="-from $PERSON"
fi
if [ $# -lt 3 ]; then
echo 'usage: sendfiles: "mailpath" "subject-string" directory-or-file ...' 1>&2
exit 1;
fi
mailpath="$1"
echo "mailpath = $mailpath" 1>&2
shift
subject="$1"
echo "subject-string = $subject" 1>&2
shift
echo "files = $*" 1>&2
tar cvf - "$@" | compress | \
viamail -to "$mailpath" -subject "$subject" \
-parameters "type=tar; x-conversions=compress" \
-comment "extract with uncompress | tar xvpf -" \
-delay "$DELAY" \
-verbose $FROM